package com.ruoyi.flow.service.impl;

import com.ruoyi.flow.api.domain.WarmFlowInteractiveType;
import com.ruoyi.flow.mapper.WarmFlowMapper;
import com.ruoyi.flow.service.ExecuteService;
import com.ruoyi.flow.vo.FlowHisTaskVo;
import com.ruoyi.flow.vo.FlowTaskVo;
import com.ruoyi.system.api.domain.SysUser;
import com.warm.flow.core.entity.HisTask;
import com.warm.flow.core.entity.Task;
import com.warm.flow.orm.entity.FlowHisTask;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author warm
 * @description: 流程执行serviceImpl
 * @date: 2023/5/29 13:09
 */
@Service
public class ExecuteServiceImpl implements ExecuteService {

    @Resource
    private WarmFlowMapper flowMapper;

    @Override
    public List<FlowTaskVo> toDoPage(Task task) {
        return flowMapper.toDoPage(task);
    }

    @Override
    public List<FlowHisTaskVo> donePage(HisTask hisTask) {
        return flowMapper.donePage(hisTask);
    }

    @Override
    public List<HisTask> selectHisTask(FlowHisTask flowHisTask) {
        return flowMapper.selectHisTask(flowHisTask);
    }

    /**
     * 查询不等于用户列表
     *
     * @param warmFlowInteractiveType warmFlow其他交互类型请求类
     * @return 用户列表
     */
    @Override
    public List<SysUser> selectNotUserList(WarmFlowInteractiveType warmFlowInteractiveType) {
        return flowMapper.selectNotUserList(warmFlowInteractiveType);
    }

    /**
     * 查询等于用户列表
     *
     * @param warmFlowInteractiveType warmFlow其他交互类型请求类
     * @return 用户列表
     */
    @Override
    public List<SysUser> selectUserList(WarmFlowInteractiveType warmFlowInteractiveType) {
        return flowMapper.selectUserList(warmFlowInteractiveType);
    }
}
